package com.itcat.service.impl;


import com.itcat.api.mysql.PmsBrandApi;
import com.itcat.mysql.pojo.PmsBrand;
import com.itcat.mysql.vo.PageResult;

import com.itcat.service.PmsBrandService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PmsBrandServiceImpl implements PmsBrandService {

    @DubboReference
    private PmsBrandApi pmsBrandApi;
    @Override
    public PageResult list(Integer pageNum, Integer pageSize,String keyword) {
        PageResult pageResult = pmsBrandApi.list(pageNum, pageSize,keyword);
        return pageResult;
    }

    @Override
    public void showStatus(List<Long> ids, Long showStatus) {
        pmsBrandApi.showStatus( ids,showStatus);
    }

    @Override
    public void updateFactory(List<Long> ids, Long showStatus) {
        pmsBrandApi.updateFactory( ids,showStatus);
    }

    @Override
    public PmsBrand selectById(Long id) {
        PmsBrand pmsBrand = pmsBrandApi.selectById( id);
        return pmsBrand;
    }

    @Override
    public void updateById(Long id, PmsBrand pmsBrand) {
        pmsBrandApi.updateById(id,pmsBrand);
    }

    @Override
    public void deleteById(Long id) {
        pmsBrandApi.deleteById(id);
    }

    @Override
    public void createBrand(PmsBrand pmsBrand) {
        pmsBrandApi.createBrand(pmsBrand);
    }
}
